package com.jeesite.modules.wxrobot.dao;

import com.jeesite.common.mybatis.annotation.MyBatisDao;
import com.jeesite.modules.wxrobot.entity.JsSysUser;
import org.apache.ibatis.annotations.Param;

@MyBatisDao
public interface JsSysUserDao {
    /**
     * 更新用户总积分
     * @param userCode 用户编码
     * @param addScore 增量积分 + 或者 -
     * @return
     */
    int updateUserTotalScore(@Param("userCode") String userCode, @Param("addScore") long addScore);

    long getUserTotalScore(@Param("userCode") String userCode);

    JsSysUser getUserByOpenId(@Param("wxOpenid") String wxOpenid);

   /* long getUserTotalScoreByWxOpenid(@Param("wxOpenid") String wxOpenid);

    String getUserCodeByWxOpenid(@Param("wxOpenid") String wxOpenid);*/

    int insertUser(JsSysUser JsSysUser);
}
